<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>CSS优先级</title>
  <style>
    .test {
      color: red;
    }

    div {
      color: pink !important;
    }

    #demo {
      color: green;
    }
  </style>
</head>

<body>
  <div class="test" id="demo" style="color: purple;">你笑起来真好看</div>
</body>

</html>